#pragma once
#include "ataskinterface.h"
#include <string>
using std::string;
#include "gdal_priv.h"
#include <qobject.h>
class TheTask :public QObject, public ARSSTaskInterface
{
	Q_OBJECT
public:
	TheTask(string infileB1,int b1B1,
		string infileB3,int b3B1,
		string outfile, double coefA,double coefB,double scale);
	virtual void run() ;
private:
	string _infileB1;
	int    _b1B1;
	string _infileB3;
	int    _b3B1;
	string _outfile;
	double _coefA;
	double _coefB;
	double _scale;
	void doOne(GDALDataset* indsB1, GDALDataset* indsB3, GDALDataset* outds, int b1B1, int b3B1,
		const int xsize, const int ysize,
		double cA, double cB,double scale);

signals:
	void onSaveTaskDone();
};

